from PyQt5.QtWidgets import QWidget
from PyQt5.QtCore import Qt

from GUI.Widget.Editor.TextToolEditor_design import Ui_Editor


class TextEditor(QWidget, Ui_Editor):
    tool = None  # 工具
    window = None   # 主窗口

    def __init__(self, window, parent, tool):
        super().__init__(parent)
        self.window = window
        self.tool = tool
        self.__initUI(parent)

    def __initUI(self, panel):
        self.setupUi(self)
        # 定位
        # self.setWindowFlags(Qt.FramelessWindowHint)

        self.setGeometry(0, 0, panel.geometry().width(), panel.geometry().height())
        self.hide()

